from config import KNOWN_WIDTH, FOCAL_LENGTH

def estimate_distance(pixel_width):
    if pixel_width == 0:
        return float('inf')
    return (KNOWN_WIDTH * FOCAL_LENGTH) / pixel_width